package ee.mtiidla.data;

import ee.mtiidla.utils.TextUtils;

/**
 * Created by Marko on 12.10.2014.
 */
public abstract class Gender {

	public static String get(String gender) {

		if (TextUtils.isEmpty(gender)) {
			return "";
		}

		if (gender.toLowerCase().equals("m")) {
			return "Men";
		} else if (gender.toLowerCase().equals("f")) {
			return "Women";
		} else if (gender.toLowerCase().equals("x")) {
			return "Mixed";
		} else {
			return "All";
		}
		
	}

	public static String get(String gender, int maxAge) {

		gender = get(gender);

		if (maxAge < 18 && maxAge != -1) {
			return gender.replace("Men", "Boys").replace("Women", "Girls");
		}

		return gender;
	}

}
